<?php
/**
 * Created by PhpStorm
 * User: Jhinwy
 * Date: 11/26/24
 * Time: 4:41 PM
 */

namespace app\adminapi\controller\skits;


use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\skits\SkitsBannerLists;
use app\adminapi\logic\skits\SkitsBannerLogic;
use app\adminapi\validate\skits\SkitsBannerValidate;


/**
 * SkitsBannerController
 * Class SkitsFollowController
 * @package app\adminapi\controller
 */
class SkitsBannerController extends BaseAdminController
{


    /**
     * @notes 获取列表
     * @return \think\response\Json
     * @author likeadmin
     * @date 2024/07/13 15:05
     */
    public function lists()
    {
        return $this->dataLists(new SkitsBannerLists());
    }


    /**
     * @notes 更新
     * @return \think\response\Json
     * @author likeadmin
     * @date 2024/07/13 15:05
     */
    public function save()
    {
        $params = (new SkitsBannerValidate())->post()->goCheck('save');
        $result = SkitsBannerLogic::save($params);
        if (true === $result) {
            return $this->success('更新成功', [], 1, 1);
        }

        return $this->fail(SkitsBannerLogic::getError());
    }



    /**
     * @notes 删除
     * @return \think\response\Json
     * @author likeadmin
     * @date 2024/07/13 15:05
     */
    public function delete()
    {
        $params = (new SkitsBannerValidate())->post()->goCheck('delete');
        SkitsBannerLogic::delete($params);
        return $this->success('删除成功', [], 1, 1);
    }

}
